using System;
using System.Collections.Generic;
using System.Text;

namespace Eve.Data
{
    public class TL2MaterialForTypeWithActivity : EveAssociation<Type, RAMActivity, Type>
    {
        private int quantity;
        private double damagePerJob;

        public Type Type
        {
            get { return From; }
        }
        public RAMActivity Activity
        {
            get { return To; }
        }
        public Type Material
        {
            get { return Index; }
        }
        public int Quantity
        {
            get { return quantity; }
        }
        public double DamagePerJob
        {
            get { return damagePerJob; }
        }

        internal TL2MaterialForTypeWithActivity(DbDataRow dr)
            : base(dr.Database, new Type(dr.Database, dr["typeID"]), new RAMActivity(dr.Database, dr["activityID"]), new Type(dr.Database, dr["requiredTypeID"]))
        {
            Fill(dr);
        }
        internal TL2MaterialForTypeWithActivity(DbDataRow dr, Type type)
            : base(dr.Database, type, new RAMActivity(dr.Database, dr["activityID"]), new Type(dr.Database, dr["requiredTypeID"]))
        {
            Fill(dr);
        }

        private void Fill(DbDataRow dr)
        {
            quantity = dr["quantity"];
            damagePerJob = dr["damagePerJob"];
        }
    }
}
